package com.cqupt.mapper;

import com.cqupt.pojo.LoginLogEntity;
import com.cqupt.pojo.OperationLogEntity;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface LogMapper {
    /**
     * 保存日志（弃用）
     * @param loginLogEntity
     */
    void saveLoginLog(LoginLogEntity loginLogEntity);

    /**
     * 保存日志
     * @param operationLogEntity
     */
    void saveOperationLog(OperationLogEntity operationLogEntity);

    /**
     * 获取所有日志
     * @return
     */
    List<OperationLogEntity> getAllOperationLogs();

    /**
     * 条件查询日志
     * @param startDate
     * @param endDate
     * @param level
     * @param objectModule
     * @param text
     * @return
     */
    List<OperationLogEntity> getOperationLogsByFilter(@Param("startDate")String startDate,@Param("endDate")String endDate,
                                                      @Param("level")String level,@Param("objectModule")String objectModule,
                                                      @Param("searchText")String text);
}
